package com.wmh.baseservice.common.config;
import com.wmh.baseservice.robot.config.MyResponseErrorHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author 青石
 */
@Configuration
public class RestTemplateConfig {

    @Bean
    public RestTemplate restTemplate(){
        RestTemplate template = new RestTemplate();
        template.setErrorHandler(new MyResponseErrorHandler());
        return template;
    }
}
